--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit bd631f6f5fd9c94afd3a9616201126177bc095f8
Parents : 5bcb4a3
Author : Mark Qvist <mark@unsigned.io>
Date : 2022-12-21T00:04:45+01:00
Updated LXMF propagation node list display
Changes
Diff
diff --git a/nomadnet/ui/textui/Network.py b/nomadnet/ui/textui/Network.py
index 81f725f..9d51928 100644
--- a/nomadnet/ui/textui/Network.py
+++ b/nomadnet/ui/textui/Network.py
@@ -1604,7 +1604,14 @@ class LXMFPeerEntry(urwid.WidgetWrap):
style = "list_unknown"
focus_style = "list_focus"
- widget = ListEntry(sym+" "+display_str+"\n "+str(len(peer.unhandled_messages))+" unhandled LXMs - "+"Last heard "+pretty_date(int(peer.last_heard)))
+ alive_string = "Unknown"
+ if hasattr(peer, "alive"):
+ if peer.alive:
+ alive_string = "Available"
+ else:
+ alive_string = "Unresponsive"
+
+ widget = ListEntry(sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))+"\n "+str(len(peer.unhandled_messages))+" unhandled LXMs")
# urwid.connect_signal(widget, "click", delegate.connect_node, node)
self.display_widget = urwid.AttrMap(widget, style, focus_style)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────